<template>
    <div class="microtravel">

        <div class="head_img">
            <img :src="datas.imgurl" alt="">
              <span
         @click="back"
        class="iconfont icon-fanhui"
      >返回</span>
        </div>

        <div class="header">
            <h1>
                <strong>{{datas.header}}</strong>
            </h1>
        </div>

        <div class="lists" v-for="(index,id) in datas.AttractionsList" :key="id">
            <div class="li">
                <router-link :to="{name:'productdetails',query:{data:item} }" tag="div" class="entry" v-for="item in index.Attractions" :key="item.id">
                    <div class="img" :style="{'background': 'url('+item.logImg[0]+') no-repeat center / cover'}"></div>
                    <div class="title">{{item.head}}</div>
                    <div class="subtitle">{{item.title}}</div>
                    <div class="discount_price">{{item.sellout}}</div>
                </router-link>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                datas:[],
            };
        },
        methods: {
            back() {
                this.$router.back()
            },
        },
        created() {
            // console.log(this.$route.query.data.Attractions);
            this.datas = this.$route.query.data
        },
        
    }
</script>

<style lang="scss" scoped>
.microtravel{
    width: 100%;
    min-height: 100%;
    padding-bottom: 70px;
    background-color: #4EBAC6;
    .lists{
        margin-top: 20px;
        .li{
            display: flex;
            justify-content: space-between;
            margin: 0 auto;
            width: 344px;
            .entry{
                width: 167px;
                height: 210px;
                position: relative;
                background-color: #fff;
                margin-top: 15px;
                border-radius: 3px;
                
                .discount_price{
                    margin: 14px 15px 0px;
                    font-size: 12px;
                    color: #999;
                }
                .subtitle{
                    margin: 5px 15px 0px;
                    font-size: 14px;
                    color: #999;
                }
                .title{
                    margin: 15px 15px 0 15px;
                    font-size: 14px;
                    color: #333;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    line-height: 1;
                }
                .img{
                    width: 167px;
                    height: 105px;
                    // background-color: #888;
                    }
            }
        }
    }
    .header{
        margin: 15px;
        h1{
            margin: 16px 0;
                text-align: center;
                font-size: 24px;
            strong{
                color: #ccc;
            }
        }
    }
    .head_img{
        width: 100%;
    display: flex;
    position: relative;
    flex-direction: column;
    span{
        position: absolute;
        top: 10px;
        left: 10px;
        color: #fff;
    }
        img{
            width: 100%;
        height: auto;
        }
    }
}
</style>